import request from '/@/utils/request';

/**
 *
 * toolsapi接口集合
 * @method getVersion 获取服务端版本号
 * @method departmentList 科室下拉
 * @method patientStatus 患者就诊状态
 * @method operationRooms 手术室
 * @method hospitalArea 病区
 * @method hospitalBeds 获取床位带病人
 * @method patientDischargeProblem 获取退出日间问题
 * @method doctorList 医生下拉
 * @method diagnosisList 诊断下拉
 * @method operationList 手术下拉
 * @method anesthesiaModeList 麻醉方式下拉
 * @method getNoticePatientTemplate 通知患者模板
 * @method anesthesiaModeList 通知医生模板
 * @method getAnesthesiaDoctorList 麻醉医生列表
 */

export function toolsApi() {
	return {
		getVersion: () => {
			return request({
				url: '/api/system/version',
				method: 'get',
			});
		},
		departmentList: (params) => {
			return request({
				url: '/api/system/departments',
				method: 'get',
				params: params
			});
		},
		outDepartmentList: (params) => {
			return request({
				url: '/tools/outpatient_departments',
				method: 'get',
				params: params
			});
		},
    patientStatus: () => {
			return request({
				url: '/tools/patient_status',
				method: 'get',
			});
		},
    operationRooms: (params) => {
			return request({
				url: '/tools/operation_rooms',
				method: 'get',
        params: params
			});
		},
    hospitalArea: () => {
			return request({
				url: '/api/system/hospital_area',
				method: 'get',
			});
		},
    hospitalBeds: (params) => {
			return request({
				url: '/tools/get_hospital_bed_in_patient',
				method: 'get',
        params: params
			});
		},
    patientDischargeProblem: () => {
			return request({
				url: '/tools/get_patient_discharge_problem',
				method: 'get',
			});
		},
		menuTreeList: (data) => {
			return request({
				url: '/api/menu/singleRole',
				method: 'get',
				params: data
			});
		},
		doctorList: (data) => {
			return request({
				url: '/tools/doctor',
				method: 'get',
				params: data
			});
		},
		diagnosisList: () => {
			return request({
				url: '/tools/get_diagnosis_list',
				method: 'get',
			});
		},
		operationList: (data) => {
			return request({
				url: '/tools/operation',
				method: 'get',
				params: data
			});
		},
		anesthesiaModeList: () => {
			return request({
				url: '/tools/get_anesthesia_mode',
				method: 'get',
			});
		},
		getNoticePatientTemplate: (params) => {
			return request({
				url: '/tools/gen_patient_notice_content',
				method: 'get',
				params: params
			});
		},
		getNoticeDoctorTemplate: (params) => {
			return request({
				url: '/tools/gen_doctor_notice_content',
				method: 'get',
				params: params
			});
		},
		getAnesthesiaDoctorList: (data) => {
			return request({
					url: '/tools/getAnesthesiologist',
					method: 'get',
					params: data,
			});
		},
		getPatientStatusList: (data) => {
			return request({
				url: '/tools/getPatientStatus',
					method: 'post',
					data,
			});
		},

	};
}


